﻿using System;
using Microsoft.Xna.Framework;
using Terraria.Localization;

namespace Terraria.Chat.Commands
{
	// Token: 0x02000499 RID: 1177
	[ChatCommand("Roll")]
	public class RollCommand : IChatCommand
	{
		// Token: 0x170002CA RID: 714
		// (get) Token: 0x0600277A RID: 10106 RVA: 0x0001B995 File Offset: 0x00019B95
		public string InternalName
		{
			get
			{
				return "roll";
			}
		}

		// Token: 0x0600277B RID: 10107 RVA: 0x00494B2C File Offset: 0x00492D2C
		public void ProcessMessage(string text, byte clientId)
		{
			int num = Main.rand.Next(1, 101);
			NetworkText text2 = NetworkText.FromFormattable("*{0} {1} {2}", new object[]
			{
				Main.player[(int)clientId].name,
				Lang.mp[9].ToNetworkText(),
				num
			});
			NetMessage.BroadcastChatMessage(text2, RollCommand.RESPONSE_COLOR, -1);
		}

		// Token: 0x040043C6 RID: 17350
		private static readonly Color RESPONSE_COLOR = new Color(255, 240, 20);
	}
}
